import { services } from '@/config'

export const tableOption = {
  border: true,
  index: true,
  indexLabel: '序号',
  stripe: true,
  menuAlign: 'center',
  align: 'center',
  searchMenuSpan: 6,
  addBtn: false,
  editBtn: false,
  delBtn: false,
  selection: true,
  tip: false,
  column: [
    {
      type: 'input',
      label: '主键ID',
      prop: 'id',
      span: 12,
      display: false,
      hide: true
    },
    {
      type: 'input',
      label: '唯一编码（用于关联附件）',
      prop: 'unid',
      span: 12,
      display: false,
      hide: true
    },
    {
      type: 'input',
      label: '借出人ID',
      prop: 'createId',
      span: 12,
      display: false,
      hide: true
    },
    {
      type: 'input',
      label: '创建人',
      prop: 'createBy',
      span: 12,
      display: false,
      hide: true
    },
    {
      type: 'input',
      label: '借出时间',
      prop: 'createTime',
      span: 12,
      display: false,
      hide: true
    },
    {
      type: 'input',
      label: '借出人所属OU的ID',
      prop: 'deptId',
      span: 12,
      display: false,
      hide: true
    },
    {
      type: 'tree',
      label: '办理状态',
      prop: 'status',
      width: 80,
      dicUrl: `${services.adminService}dict/type/borrow_status`,
      dicMethod: 'get',
      span: 8,
      props: { label: 'label', value: 'value' },
      search: true
    },
    {
      type: 'select',
      label: '借用状态',
      prop: 'type',
      width: 80,
      dicData: [
        {
          label: '借用',
          value: '0'
        },
        {
          label: '归还',
          value: '1'
        }
      ],
      span: 8,
      search: true
    },
    {
      type: 'input',
      label: '借用单号',
      prop: 'caseid',
      span: 12,
      width: 175,
      search: true
    },
    {
      type: 'input',
      label: '借用人ID',
      prop: 'borrowId',
      span: 12,
      display: false,
      hide: true
    },
    {
      type: 'input',
      label: '借用人',
      prop: 'borrowName',
      span: 12,
      search: true
    },
    {
      type: 'input',
      label: '借用人所属OU的ID',
      prop: 'borrowOuid',
      span: 12,
      display: false,
      hide: true
    },
    {
      type: 'input',
      label: '借用人所属OU的全称',
      prop: 'borrowOufullname',
      span: 12,
      display: false,
      hide: true
    },
    {
      type: 'input',
      label: '借用人所属OU的名称',
      prop: 'borrowOuname',
      span: 12,
      display: false,
      hide: true
    },
    {
      type: 'datetime',
      label: '借用时间',
      prop: 'borrowTime',
      span: 12,
      width: 135,
      format: 'yyyy-MM-dd HH:mm:ss',
      valueFormat: 'yyyy-MM-dd HH:mm:ss',
      search: true,
      searchSpan: 12,
      searchRange: true
    },
    {
      type: 'datetime',
      label: '预计归还',
      prop: 'forecastRemandTime',
      span: 12,
      width: 135,
      format: 'yyyy-MM-dd HH:mm:ss',
      valueFormat: 'yyyy-MM-dd HH:mm:ss',
      search: true,
      searchSpan: 12,
      searchRange: true
    },
    {
      type: 'datetime',
      label: '实际归还',
      prop: 'realRemandTime',
      span: 12,
      width: 135,
      format: 'yyyy-MM-dd HH:mm:ss',
      valueFormat: 'yyyy-MM-dd HH:mm:ss',
      search: true,
      searchSpan: 12,
      searchRange: true
    },
    {
      type: 'input',
      label: '资产明细',
      prop: 'detailedEx',
      span: 12,
      width: 160
    },
    {
      type: 'input',
      label: '说明',
      prop: 'explains',
      span: 12,
      display: false,
      hide: true
    },
    {
      type: 'input',
      label: '资产名称',
      span: 24,
      display: true,
      prop: 'cardName',
      hide: true,
      search: true
    },
    {
      type: 'input',
      label: '资产编码',
      span: 12,
      display: true,
      prop: 'cardCode',
      hide: true,
      search: true
    },
    {
      type: 'input',
      label: '商品条码',
      span: 24,
      display: true,
      prop: 'barcode',
      hide: true,
      search: true
    },
    {
      type: 'input',
      label: '规格型号',
      span: 24,
      display: true,
      prop: 'model',
      hide: true,
      search: true
    },
    {
      type: 'number',
      label: '金额',
      span: 24,
      display: true,
      prop: 'amount',
      hide: true,
      search: true
    }
  ]
}
